# $FreeBSD:  366931 2014-09-01 19:06:38Z tijl $
#    $MCom: ports/sysutils/consolekit/Makefile,v 1.25 2010/10/23 10:12:30 kwm Exp $

PORTNAME=	consolekit2
PORTVERSION=	0.9.2
CATEGORIES=	sysutils
MASTER_SITES=	GH GHC

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Framework for defining and tracking users

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/COPYING

LIB_DEPENDS=	libdbus-glib-1.so:${PORTSDIR}/devel/dbus-glib \
		libpolkit-gobject-1.so:${PORTSDIR}/sysutils/polkit

CONFLICTS=	consolekit-0.4.*

WRKSRC=		${WRKDIR}/ConsoleKit2-ConsoleKit2-${GH_COMMIT}
USE_GITHUB=	yes
USES=		gettext gmake libtool pathfix pkgconfig autoreconf
USE_XORG=	x11
USE_GNOME=	glib20
GNU_CONFIGURE=	yes
USE_LDCONFIG=	yes
CPPFLAGS+=	-I${LOCALBASE}/include
LIBS+=	-L${LOCALBASE}/lib
CONFIGURE_ARGS=	--with-pid-file=/var/run/${PORTNAME:S/2//}.pid \
		--localstatedir=/var \
		--enable-polkit \
		--enable-pam-module \
		--disable-udev-acl \
		--with-pam-module-dir=${PREFIX}/lib/security \
		--without-systemdsystemunitdir
INSTALL_TARGET=	install-strip

GH_ACCOUNT=	ConsoleKit2
GH_PROJECT=	${GH_ACCOUNT}
GH_TAGNAME=	${PORTVERSION}
GH_COMMIT=	fb6de51

PATHFIX_MAKEFILEIN=	Makefile.am

post-install:
	${MKDIR} ${STAGEDIR}/var/log/ConsoleKit
	${TOUCH} ${STAGEDIR}/var/log/ConsoleKit/history

.include <bsd.port.mk>
